﻿using System;
using Microsoft.SmallBasic.Library;
using SmallBasicFun;
using Math = Microsoft.SmallBasic.Library.Math;

namespace HiLow
{
    public class HiLow
    {
        //answer = Math.GetRandomNumber(100)
        //guess = MessageBox.AskForInput("Guess a number between 1-100")
        //Sound.PlayBellRingAndWait()
        //MessageBox.ShowMessage("You won!")
        //Program.End()
        public static void Main()
        {


            //Choose a random number between 1 and 100
            var answer = Math.GetRandomNumber(100);
            //Do the following 8 times
            for (int i = 0; i < 8; i++)
            {
                // Ask the user for a guess.
                var guess = MessageBox.AskForInput("Guess a number between 1-100");
                // If the guess is correct
                if (guess == answer) 
                {
                    // Play a bell
                    Sound.PlayBellRingAndWait();
                    // Tell the user that they won the game and exit
                    MessageBox.ShowMessage("You won! Now buy me a pizza!");
                    Program.End();
                
                }
                
                // Otherwise, if the guess is too high
                else if (guess > answer)
                {
                    MessageBox.ShowMessage("Yo number is a bit too high dawg");
                }// Otherwise, if the guess is too low

                else if (guess < answer)
                {
                    // Tell the end user that it is too low
                    MessageBox.ShowMessage("Yo number is too low man");
                    //Repeat

                }
                   

                    //If after 8 times they haven//t guessed correctly then
                else

                {
                    MessageBox.ShowMessage("You lost. Better luck next time!");
                }// Tell them they//ve lost the game
             
            }

        }


        public static void AdjustPen()
        {
            /*
            if (blah)
            {
                
            }
            else if (b)
            {
                
            }
            else if (b)
            {

            }
            else if (b)
            {

            }
            else
            {
                
            }
            */
        }


    }
}